//
//  ViewController.m
//  IconfontDemo
//
//  Created by ZJ on 2018/7/20.
//  Copyright © 2018年 iCatch Technology Inc. All rights reserved.
//

#import "ViewController.h"
#import "UIButton+ZJIconfont.h"
#import "UILabel+ZJIconfont.h"
#import "ZJCustomButton.h"

@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
    
//    [self setupGUI];
}

- (void)viewWillAppear:(BOOL)animated {
    [super viewWillAppear:animated];
    
//    [self setupGUI];
}

- (void)setupGUI {
    UIButton *btn = [[UIButton alloc] initWithFrame:CGRectMake(100, 200, 50, 50) unicode:@"\U0000e626" titleColor:[UIColor redColor] iconfontSize:0];
    
    [self.view addSubview:btn];
    
    UIButton *btn1 = [[UIButton alloc] initWithFrame:CGRectMake(100, 300, 50, 50) unicode:@"\U0000e625" titleColor:[UIColor redColor] iconfontSize:0];
    
    [self.view addSubview:btn1];
    
    
    UIButton *btn2 = [[UIButton alloc] initWithFrame:CGRectMake(100,400, 50, 50) unicode:@"\U0000e624" titleColor:[UIColor redColor] iconfontSize:0];
    
    [self.view addSubview:btn2];
    
    UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(20, 450, 200, 30) unicode:@"\U0000e77d" textColor:[UIColor redColor] backgroundColor:nil iconfontSize:28];
    [self.view addSubview:label];
    
    UIView *cus = [[ZJCustomButton alloc] initCustomButtonWithFrame:CGRectMake(100, 100, 50, 50) unicode:@"\U0000e626" title:@"身份证" target:self action:@selector(btnClick:)];
    cus.backgroundColor = [UIColor greenColor];
    
//    UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(btnClick:)];
//    [cus addGestureRecognizer:tap];
    
    [self.view addSubview:cus];
}

- (void)btnClick:(id)sender {
    NSLog(@"--> %s -- %@", __func__, [sender class]);
}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}


@end
